package com.sysware.p2m.tomcat;

import java.util.Enumeration;
import java.util.ResourceBundle;

import javax.servlet.ServletException;

import org.apache.catalina.LifecycleException;
import org.apache.catalina.startup.Bootstrap;
import org.apache.catalina.startup.Tomcat;

public class TomcatStart {

	public static void main1(String[] args) throws Exception {
		Bootstrap b = new Bootstrap();
		b.start();
		b.wait();
	}

	public static void main2(String[] args) {
		String baseFileName = "myres";
		ResourceBundle resourceBundle = ResourceBundle.getBundle(baseFileName);
		Enumeration<String> e = resourceBundle.getKeys();
		System.out.println(e);
	}

	public static void main(String[] args) throws ServletException, LifecycleException {
		Tomcat tomcat = new Tomcat();
		tomcat.setPort(9999);
		tomcat.addWebapp("sysware", "D:\\develop\\workspce\\Demo\\src\\main\\webapp");
		tomcat.start();
		tomcat.getServer().await();
	}

}